﻿using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace WeBlog.Models
{
    public class BlogPostComment
    {
        [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        public int Id { get; set; }
        public int BlogPostId { get; set; }

        [Display(Name = "Date Posted")]
        public DateTime BlogDateTime { get; set; }

        [Required(ErrorMessage = "Name is required before posting a comment")]
        [Display(Name = "Name")]
        public string Name { get; set; }

        [Required(ErrorMessage = "Your message reply is required before posting a comment")]
        [Display(Name = "Reply")]
        public string Body { get; set; }
    }
}